package com.example.serviceorder.config;

import com.example.serviceorder.interceptor.WeatherRequestInterceptor;
import com.example.serviceorder.interceptor.WeatherResponseInterceptor;
import feign.RequestInterceptor;
import feign.ResponseInterceptor;
import org.springframework.context.annotation.Bean;

public class WeatherFeignConfig {

    /**
     * 天气请求拦截器：可用于统一添加头、记录日志、鉴权等
     */
    @Bean
    public RequestInterceptor weatherRequestInterceptor() {
        return new WeatherRequestInterceptor();
    }

    /**
     * 天气响应拦截器：可用于统一处理响应结果、打印日志等
     */
    @Bean
    public ResponseInterceptor weatherResponseInterceptor() {
        return new WeatherResponseInterceptor();
    }
}
